package org.greatlogic.gwtfilereaderwidget.client.widget;

import com.google.gwt.event.shared.EventHandler;
import com.google.web.bindery.event.shared.Event;
import org.greatlogic.gwtfilereaderwidget.client.widget.FileReaderWidgetEvent.IFileReaderWidgetEventHandler;
import org.vectomatic.file.FileList;

public class FileReaderWidgetEvent extends Event<IFileReaderWidgetEventHandler> {
//--------------------------------------------------------------------------------------------------
public static final Type<IFileReaderWidgetEventHandler> FileWidgetReaderEventType = new Type<IFileReaderWidgetEventHandler>();

private FileList                                        _fileList;
//==================================================================================================
public interface IFileReaderWidgetEventHandler extends EventHandler {
public void onFileReaderWidgetEvent(final FileReaderWidgetEvent fileReaderWidgetEvent);
} // interface IFileReaderWidgetEventHandler
//==================================================================================================
FileReaderWidgetEvent(final FileList fileList) {
  _fileList = fileList;
} // FileReaderWidgetEvent()
//--------------------------------------------------------------------------------------------------
@Override
protected void dispatch(final IFileReaderWidgetEventHandler handler) {
  handler.onFileReaderWidgetEvent(this);
} // dispatch()
//--------------------------------------------------------------------------------------------------
@Override
public Type<IFileReaderWidgetEventHandler> getAssociatedType() {
  return FileWidgetReaderEventType;
} // getAssociatedType()
//--------------------------------------------------------------------------------------------------
public FileList getFileList() {
  return _fileList;
} // getFileList()
//--------------------------------------------------------------------------------------------------
}